package com.crm.system.service.cluePoolManager;

import com.crm.common.model.DhPageInfo;
import com.crm.model.vo.cluePoolManager.ClueReceiveVO;

/**
 * @ Author ：pym
 * @ Date   ：2021/1/8 13:05
 */
public interface ClueReceiveService {
    /**
     * 线索池详情-线索清单-领取记录
     * @param pageIndex     ---页码
     * @param pageSize      ---分页大小
     * @param clueId        ---线索Id
     * @return
     */
    DhPageInfo<ClueReceiveVO> selectClueReceiveVOList(Integer pageIndex, Integer pageSize, String clueId);

    /**
     *新增一条领取/分配记录
     * @param fromId       ---原线索池id
     * @param toId         ---新线索池id
     * @param clueId       ---线索ID
     * @param accountId    ---被分配/领取人ID
     * @param receiveWay   ---领取方式：1-领取；2:分配
     * @return
     */
    Boolean insertClueReceive(String fromId,String toId,String clueId,String accountId,Integer receiveWay);

    /**
     * 查询线索池传入月份领取量
     * @param cluePoolId
     * @param yearMonth
     * @return
     */
    long selectReceiveCountForCurrentMonthByPoolId(String cluePoolId,String yearMonth);

    /**
     * 根据线索id查询线索接收数量
     * @param cluePoolId
     * @return
     */
    long selectClueReceiveByPoolId(String cluePoolId);
}
